#include <iostream>
using namespace std;
#include <queue>
#include <vector>

int main()
{
    priority_queue<int,vector<int>,greater<int>> heap;
    int nums[] = {9,8,7,6,5,4,3,2,1,0};
    for (auto& x : nums) heap.push(x);
    while(!heap.empty())
    {
        cout << heap.top() << " ";
        heap.pop();
    }
    cout << endl;
    return 0;
}
